import request from '@/utils/request'

// 短剧库列表
export function queryListLibrary(data) {
  return request({
    url: `/video/list/library?page=${data.pageNum}`,
    method: 'post',
    data: data
  })
}

// 短剧库列表-不分页版本
export function queryNonSortLibrary(data) {
  return request({
    url: '/video/nonSort/library',
    method: 'post',
    data: data
  })
}

// 添加短剧库
export function addLibrary(data) {
  return request({
    url: '/video/add/library',
    method: 'post',
    data: data
  })
}
// 修改短剧库
export function editLibrary(data) {
  return request({
    url: '/video/edit/library',
    method: 'post',
    data: data
  })
}
// 删除短剧库
export function delLibrary(data) {
  return request({
    url: '/video/del/library',
    method: 'post',
    data: data
  })
}
// 短剧库详情
export function queryInfoLibrary(data) {
  return request({
    url: '/video/info/library',
    method: 'post',
    data: data
  })
}

// 剧集库列表
export function queryListEpisode(data) {
  return request({
    url: `/video/episode/list?page=${data.pageNum}`,
    method: 'post',
    data: data
  })
}
// 单独添加剧集库
export function addEpisode(data) {
  return request({
    url: '/video/episode/add',
    method: 'post',
    data: data
  })
}

// 批量添加剧集库
export function addBatchEpisode(data) {
  return request({
    url: '/video/episode/batch/add',
    method: 'post',
    data: data
  })
}

// 修改剧集库
export function editEpisode(data) {
  return request({
    url: '/video/episode/edit',
    method: 'post',
    data: data
  })
}

// 删除剧集库
export function deleteEpisode(data) {
  return request({
    url: '/video/episode/del',
    method: 'post',
    data: data
  })
}

// 修改价格(可批量)
export function changePriceEpisode(data) {
  return request({
    url: '/video/episode/change/price',
    method: 'post',
    data: data
  })
}

// 剧集总览
export function queryTotalEpisode(data) {
  return request({
    url: '/video/episode/total/info',
    method: 'post',
    data: data
  })
}

/** 短剧库-是否完结 */
export const IS_END = {
  1: '完结',
  2: '未完结'
}
/** 短剧库-上架状态 */
export const IS_PUBLISH = {
  1: '上架',
  2: '未上架'
}
/** 短剧库-转码状态 */
export const CONVERT_STATUS = {
  0: '未开始',
  1: '已完成',
  2: '进行中',
  3: '错误'
}
